<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>操作日志管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/css/public.css" media="all" />
</head>
<body class="childrenBody">
<!-- 数据表格开始-->
<div>
    <table class="layui-hide" id="meritTable" lay-filter="meritTable"></table>
</div>

<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" th:inline="none">
    layui.use(['jquery','form','table','layer','laydate'], function(){
        var $ = layui.jquery;
        var form = layui.form;
        var table = layui.table;
        var layer = layui.layer;

        // 加载操作日志数据
        var tableIns = table.render({
            elem: '#meritTable',
            url: '/operateLog/list',   // 修改为正确接口地址
            title: '操作日志数据表',
            height: 'full-77',
            page: true,
            parseData: function(res) {
                // 转换后端返回数据格式为layui格式
                return {
                    "code": res.code === 200 ? 0 : res.code, // layui要求0为成功
                    "msg": res.msg,
                    "count": res.data ? res.data.length : 0,
                    "data": res.data || []
                };
            },
            cols: [[
                // {type: 'checkbox', fixed: 'left'},
                {field:'id', title:'ID', align:'center'},
                {field:'operateEmpId', title:'操作人ID', align:'center'},
                {field:'operateTime', title:'操作时间', align:'center'},
                {field:'className', title:'类名', align:'center'},
                {field:'methodName', title:'方法名', align:'center'},
                {field:'methodParams', title:'参数', align:'center'},
                {field:'returnValue', title:'返回值', align:'center'},
                {field:'costTime', title:'耗时(ms)', align:'center'}
            ]]
        });
    });
</script>
</body>
</html>
